package com.dd.cloud.user.service.phar;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dd.cloud.user.entity.phar.PharExpressRule;
import com.dd.cloud.user.entity.phar.PharSetFeeRecord;
import com.dd.cloud.user.entity.phar.PharmacyUser;
import com.dd.cloud.user.req.phar.*;
import com.dd.cloud.user.res.admin.AdminUserDetailRes;
import com.dd.cloud.user.res.phar.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author Lx
 * @version 1.0
 */
public interface IPharmacyUserService extends IService<PharmacyUser> {
    /**
     * 分页查询门店管理员
     *
     * @param req
     * @return
     */
    Page<StroeUserPageRes> getStoreUserPage(StoreUserPageReq req);

    /**
     * 添加门店管理员
     *
     * @param req
     */
    void addStoreUser(StoreUserAddReq req);

    /**
     * 查询药房管理员详情
     *
     * @param id
     * @return AdminUserDetailRes
     */
    AdminUserDetailRes getAdminUserDetail(Integer id);

    /**
     * 修改门店管理员状态
     *
     * @param id:     管理员id
     * @param status: 状态值
     * @return void
     */
    void updateStoreUserStatus(Integer id, Integer status);

    /**
     * 修改管理员
     *
     * @param req
     * @return
     */
    void updateStoreUser(StoreUserUpdateReq req);

    /**
     * 通过手机验证码登录
     *
     * @param request
     * @param response
     * @param account
     * @param password
     * @return
     */
    StoreUserLoginRes storeUserLoginPwd(HttpServletRequest request, HttpServletResponse response, String account, String password);

    /**
     * 通过手机验证码登录
     *
     * @param request
     * @param response
     * @param phone
     * @param code
     * @return
     */
    StoreUserLoginRes pharmacyUserLoginCode(HttpServletRequest request, HttpServletResponse response, String phone, String code);

    /**
     * 修改密码
     *
     * @param newPwd1
     * @param oldPwd
     * @param newPwd2
     */
    void updateStoreUserPwd(String oldPwd, String newPwd1, String newPwd2);

    /**
     * 退出
     *
     * @param request
     * @param response
     */
    void loginOut(HttpServletRequest request, HttpServletResponse response);

    /**
     * 查询物流费用详情
     *
     * @return PharExpressRule
     */
    PharExpressRule getPharmacyExpFee();

    /**
     * 查询代煎费用
     *
     * @return PharFryingRule
     */
    PharmacyProcessTypeRes getPharmacyFryFee();

    /**
     * 更新物流设置
     *
     * @param pharExpRuleRes
     * @return
     */
    void updatePharmacyExpFee(PharExpRuleRes pharExpRuleRes);

    /**
     * @param pharFryRuleRes
     * @return
     */
    void updatePharmacyFryFee(PharFryRuleReq pharFryRuleRes);

    /**
     * 查询修改记录
     *
     * @param pharSetReq
     * @return Page<PharSetFeeRecord>
     */
    Page<PharSetFeeRecord> getSetFeePage(PharSetReq pharSetReq);

    /**
     * 查询物流代煎费
     *
     * @param pharId
     * @return PharFeeRes
     */
    PharFeeRes queryFee(Integer pharId);

    /**
     * 找回密码
     *
     * @param phone
     * @param pwd1
     * @param pwd2
     * @param code
     */
    void findStoreUserPwd(String phone, String code, String pwd1, String pwd2);

    /**
     * @return PharmacyProcessTypeRes
     */
    PharmacyProcessTypeRes getFryingFeePage();

    /**
     * @param types
     * @return List<PharRuleFeeRes>
     */
    List<PharOneRuleFeeRes> getOneRuleList(String types, Integer pharId);

    /**
     * @param types
     * @return List<PharTwoRuleFeeRes>
     */
    List<PharTwoRuleFeeRes> getTwoRuleList(String types, Integer pharId);

    /**
     *@param pharId  药房id
     * @return
     */
    PharRuleRes getPharmacyRuleRes(Integer pharId);
}
